package com.sservice.service.service;

import com.sservice.model.entity.LadingBill;
import com.sservice.model.entity.LadingOrder;
import com.sservice.model.vo.LadingBillVo;
import com.sservice.model.vo.LadingOrderVo;
import com.sservice.urp.vo.UserVo;

import java.util.List;

public interface ILadingBillService {

    int deleteByPrimaryKey(Integer id);

    int insert(LadingBill record);

    int insertSelective(LadingBill record);

    /**
     * 创建提单
     *
     * @param record
     * @return
     */
    Object create(LadingBillVo record, Boolean isForce);

    /**
     *  审核通过
     * @param record
     * @param isForce
     * @return
     */
    Object allow(LadingBillVo record, Boolean isForce);

    /**
     *  审核拒绝
     * @param record
     * @return
     */
    Object refuse(LadingBillVo record);

    /**
     * sale person 创建提单
     *
     * @param record
     * @return
     */
    Object createBySp(LadingBill record);

    /**
     * @param record
     * @param isAuth 是否有权限删除已经录入实提数量的提货单
     * @return
     */
    Object deleteWithAuth(LadingBill record, Boolean isAuth);

    /**
     * 审核sp 用户创建的提单
     *
     * @param record
     * @return
     */
    Object checkSpLadingBill(LadingBill record);

    LadingBill selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(LadingBill record);

    /**
     *  前端变更
     * @param record
     * @return
     */
    Object update(LadingBill record);

    int updateByPrimaryKey(LadingBill record);

    List<LadingBill> queryByPage(LadingBillVo arg);
    List<LadingBillVo> combineQueryByPage(LadingBillVo arg);

    int queryCount(LadingBillVo arg);

    /**
     * 更新实提数量
     *
     * @param arg
     * @return
     */
    Object update_labing_bill_actual(LadingOrder arg);

    Object batchUpdateLadingBillActual(LadingOrderVo arg, String userId);
    Object batchUpdateLadingBillActual2(LadingOrderVo arg, String userId);

    /**
     * 根据仓库ID 查找提单数量
     */
    int selectByStoreId(LadingBill record);

    /**
     * 申请发票
     *
     * @param record
     * @return
     */
    int applyPaper(LadingBill record);

    /***
     *  清零
     * @param record
     * @return
     */
    Object clear(LadingBillVo record, UserVo user);

    /**
     * 替换批号
     *
     * @param record
     * @return
     */
    Object replace(LadingOrder record);

    /***
     *  批号发货
     * @param record
     * @param isForce
     * @return
     */
    public Object send(LadingBillVo record, Boolean isForce);

    public Object send(LadingBillVo record, String isSuper);

    /**
     *  发货权限账户发货
     * @param record
     * @return
     */
    public Object permissionCreate(LadingBillVo record);


}
